.class public Lcom/adview/adapters/SuizongAdapter;
.super Lcom/adview/adapters/AdViewAdapter;
.source "SuizongAdapter.java"

# interfaces
.implements Lcom/suizong/mobplate/ads/AdListener;


# instance fields
.field private adView:Lcom/suizong/mobplate/ads/AdView;


# direct methods
.method public constructor <init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V
    .locals 0
    .parameter "adViewLayout"
    .parameter "ration"

    .prologue
    .line 28
    invoke-direct {p0, p1, p2}, Lcom/adview/adapters/AdViewAdapter;-><init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V

    .line 30
    return-void
.end method


# virtual methods
.method public handle()V
    .locals 7

    .prologue
    .line 36
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v4

    sget-object v5, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v4, v5, :cond_0

    .line 37
    const-string v4, "AdView SDK v1.7.0"

    const-string v5, "Into Suizong"

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 38
    :cond_0
    iget-object v4, p0, Lcom/adview/adapters/SuizongAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v4}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/adview/AdViewLayout;

    .line 39
    .local v2, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v2, :cond_2

    .line 73
    :cond_1
    :goto_0
    return-void

    .line 45
    :cond_2
    iget-object v4, v2, Lcom/adview/AdViewLayout;->activityReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v4}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    .line 46
    .local v0, activity:Landroid/app/Activity;
    if-eqz v0, :cond_1

    .line 51
    new-instance v4, Lcom/suizong/mobplate/ads/AdView;

    sget-object v5, Lcom/suizong/mobplate/ads/AdSize;->BANNER:Lcom/suizong/mobplate/ads/AdSize;

    iget-object v6, p0, Lcom/adview/adapters/SuizongAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v6, v6, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    invoke-direct {v4, v0, v5, v6}, Lcom/suizong/mobplate/ads/AdView;-><init>(Landroid/app/Activity;Lcom/suizong/mobplate/ads/AdSize;Ljava/lang/String;)V

    iput-object v4, p0, Lcom/adview/adapters/SuizongAdapter;->adView:Lcom/suizong/mobplate/ads/AdView;

    .line 52
    iget-object v4, p0, Lcom/adview/adapters/SuizongAdapter;->adView:Lcom/suizong/mobplate/ads/AdView;

    invoke-virtual {v4, p0}, Lcom/suizong/mobplate/ads/AdView;->setAdListener(Lcom/suizong/mobplate/ads/AdListener;)V

    .line 54
    new-instance v1, Lcom/suizong/mobplate/ads/AdRequest;

    invoke-direct {v1}, Lcom/suizong/mobplate/ads/AdRequest;-><init>()V

    .line 55
    .local v1, adRequest:Lcom/suizong/mobplate/ads/AdRequest;
    const-wide/16 v4, -0x1

    invoke-virtual {v1, v4, v5}, Lcom/suizong/mobplate/ads/AdRequest;->setRefreshTime(J)V

    .line 57
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v4

    sget-object v5, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v4, v5, :cond_3

    .line 58
    const/4 v3, 0x1

    .line 65
    .local v3, testmode:Z
    :goto_1
    invoke-virtual {v1, v3}, Lcom/suizong/mobplate/ads/AdRequest;->setTesting(Z)V

    .line 66
    iget-object v4, p0, Lcom/adview/adapters/SuizongAdapter;->adView:Lcom/suizong/mobplate/ads/AdView;

    invoke-virtual {v4, v1}, Lcom/suizong/mobplate/ads/AdView;->loadAd(Lcom/suizong/mobplate/ads/AdRequest;)V

    goto :goto_0

    .line 59
    .end local v3           #testmode:Z
    :cond_3
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v4

    sget-object v5, Lcom/adview/AdViewTargeting$RunMode;->NORMAL:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v4, v5, :cond_4

    .line 60
    const/4 v3, 0x0

    .restart local v3       #testmode:Z
    goto :goto_1

    .line 62
    .end local v3           #testmode:Z
    :cond_4
    const/4 v3, 0x0

    .restart local v3       #testmode:Z
    goto :goto_1
.end method

.method public onDismissScreen(Lcom/suizong/mobplate/ads/Ad;)V
    .locals 2
    .parameter "paramAd"

    .prologue
    .line 117
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 118
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "onDismissScreen"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 119
    :cond_0
    return-void
.end method

.method public onFailedToReceiveAd(Lcom/suizong/mobplate/ads/Ad;Lcom/suizong/mobplate/ads/AdRequestError;)V
    .locals 3
    .parameter "paramAd"
    .parameter "paramAdRequestError"

    .prologue
    .line 95
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 96
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "Suizong failure"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 98
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/SuizongAdapter;->adView:Lcom/suizong/mobplate/ads/AdView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/suizong/mobplate/ads/AdView;->setAdListener(Lcom/suizong/mobplate/ads/AdListener;)V

    .line 100
    iget-object v1, p0, Lcom/adview/adapters/SuizongAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 101
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 106
    :goto_0
    return-void

    .line 104
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover_pri()V

    .line 105
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedPri()V

    goto :goto_0
.end method

.method public onLeaveApplication(Lcom/suizong/mobplate/ads/Ad;)V
    .locals 2
    .parameter "paramAd"

    .prologue
    .line 123
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 124
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "onLeaveApplication"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 125
    :cond_0
    return-void
.end method

.method public onPresentScreen(Lcom/suizong/mobplate/ads/Ad;)V
    .locals 2
    .parameter "paramAd"

    .prologue
    .line 111
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 112
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "onPresentScreen"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 113
    :cond_0
    return-void
.end method

.method public onReceiveAd(Lcom/suizong/mobplate/ads/Ad;)V
    .locals 4
    .parameter "paramAd"

    .prologue
    .line 77
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 78
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "Suizong success"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 80
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/SuizongAdapter;->adView:Lcom/suizong/mobplate/ads/AdView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/suizong/mobplate/ads/AdView;->setAdListener(Lcom/suizong/mobplate/ads/AdListener;)V

    .line 82
    iget-object v1, p0, Lcom/adview/adapters/SuizongAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 83
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 91
    :goto_0
    return-void

    .line 87
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 88
    iget-object v1, v0, Lcom/adview/AdViewLayout;->handler:Landroid/os/Handler;

    new-instance v2, Lcom/adview/AdViewLayout$ViewAdRunnable;

    iget-object v3, p0, Lcom/adview/adapters/SuizongAdapter;->adView:Lcom/suizong/mobplate/ads/AdView;

    invoke-direct {v2, v0, v3}, Lcom/adview/AdViewLayout$ViewAdRunnable;-><init>(Lcom/adview/AdViewLayout;Landroid/view/ViewGroup;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 89
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V

    goto :goto_0
.end method
